<template>
	<div class="page result editStoreSuccess">
		<div class="scroll-view">
			<customHeader :middleTitle="header"  @leftCallBack="complete"   />
			<div class="page-body">
				<result type="success" title="提交成功" msg="" />
				<div class="btnBox">
					<!-- <mt-button v-if="!iscro&&shopId" class="btn" type="primary" plain @click="toJinjian">开通收款账户</mt-button> -->
					<mt-button v-if="!iscro&&shopId" class="btn" type="primary"  plain @click="complete">完成</mt-button>
					<mt-button v-if="iscro" class="btnOne" type="primary"  plain @click="complete">完成</mt-button>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
import Vue from "vue";
import customHeader from "../../components/header/header";
import result from "../../components/result/result";
export default {
  name: "editStoreSuccess",
  data() {
    return {
      header: "新增门店",
			shopId:'',
			iscro:false
    };
  },
  methods: {
    complete() {
      this.$router.push({ path: "/storeManage",query: {close:"true"} });
    },
		toJinjian(){
			this.$router.push({ path: "/storeManage/openShroffAccount",query: CommonUtil.concatSessionId({shopId:this.shopId,addStore:'true'}) });
		}
  },
  created: function() {
    const query = this.$route.query;
    const shopId = query.shopId;
		const AuditStatus = query.AuditStatus.toString();
		const editType = query.editType;
    this.shopId = shopId;
		switch(AuditStatus){
			case '1':
			this.iscro = true;
			break;
			case '2':
			this.iscro = true;
			break;
			case '3':
			this.iscro = true;
			break;
			case '4':
			this.iscro = true;
			break;
		}
		if(editType == '2'){
			this.header = '编辑门店'
		}
  },
  components: {
    customHeader,
    result
  }
};
</script>
<style lang='scss' scoped>
@import "result";
</style>
